package com.example.myapplication2;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class retry extends AppCompatActivity {
    private Button yes;
    private Button no;
    private TextView trytime;
    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_retry);
        trytime= (TextView) findViewById(R.id.text);
        trytime.setText("已完成"+para.retest+"次，是否重新测量");
        yes=(Button) findViewById(R.id.yes);
        yes.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                para.pause=0;
                para.first=1;
                Intent intent=new Intent(retry.this, collecting.class);
                startActivity(intent);
            }
        });
        no=(Button)findViewById(R.id.no);
        no.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                para.pause=1;
                para.first=0;
                para.retest=0;
                para.choose[0]=0;
                para.choose[1]=0;
                para.choose[2]=0;
                Intent intent=new Intent(retry.this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);;
                startActivity(intent);
            }
        });
    }
}